package soul.web.vo;

import org.activiti.engine.identity.User;
import org.activiti.engine.impl.persistence.entity.UserEntity;
import org.hibernate.validator.constraints.NotBlank;
import soul.utils.IDGenerator;

/**
 * Created by sunzhengjie on 2017/2/17.
 */
public class FormAddUser {
    @NotBlank
    private String username;
    @NotBlank
    private String password;
    private String phone;
    private String email;

    public UserEntity toDomain(){
        UserEntity user = new UserEntity();
        user.setId(this.username);
        user.setFirstName(this.username);
        user.setPassword(this.password);
        return user;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}
